package cn.powerone.scm.domain;

import java.math.BigDecimal;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.powerone.common.annotation.Excel;
import cn.powerone.common.core.domain.BaseEntity;

/**
 * 年度统计信息-总对象 scm_stats_yearly
 * 
 * @author PowerOne
 * @date 2025-09-09
 */
@Getter
@Setter
public class ScmStatsYearly extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 统计ID */
    private Long id;

    /** 年份 */
    @Excel(name = "年份")
    private Long year;

    /** 季度(0-4) */
    @Excel(name = "季度(0-4)")
    private Long quarter;

    /** 总项目数 */
    @Excel(name = "总项目数")
    private Long totalProjects;

    /** 总产品数 */
    private Long totalProducts;

    /** 总客户数 */
    @Excel(name = "总客户数")
    private Long totalCustomer;

    /** 总供应商数 */
    @Excel(name = "总供应商数")
    private Long totalSupplier;

    /** 总活跃客户数 */
    @Excel(name = "总活跃客户数")
    private Long totalActiveCustomer;

    /** 总活跃供应商数 */
    @Excel(name = "总活跃供应商数")
    private Long totalActiveSupplier;

    /** 客户总订单数 */
    @Excel(name = "客户总订单数")
    private Long totalCustomerOrders;

    /** 供应商总订单数 */
    @Excel(name = "供应商总订单数")
    private Long totalSupplierOrders;

    /** 客户总采购金额 */
    @Excel(name = "客户总采购金额")
    private BigDecimal totalCustomerAmount;

    /** 供应商总采购金额 */
    @Excel(name = "供应商总采购金额")
    private BigDecimal totalSupplierAmount;

    /** 客户产品总量 */
    @Excel(name = "客户产品总量")
    private Long totalCustomerQuantity;

    /** 供应商产品总量 */
    @Excel(name = "供应商产品总量")
    private Long totalSupplierQuantity;

    /** 不合格产品总量 */
    @Excel(name = "不合格产品总量")
    private Long totalCustomerDefectiveQuantity;

    /** 不合格产品总量 */
    @Excel(name = "不合格产品总量")
    private Long totalSupplierDefectiveQuantity;

    /** 生产良率(%) */
    @Excel(name = "生产良率(%)")
    private BigDecimal productionYieldRate;

    /** 入库总量 */
    @Excel(name = "入库总量")
    private Long totalStockIn;

    /** 出库总量 */
    @Excel(name = "出库总量")
    private Long totalStockOut;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("year", getYear())
            .append("quarter", getQuarter())
            .append("totalProjects", getTotalProjects())
            .append("totalCustomer", getTotalCustomer())
            .append("totalSupplier", getTotalSupplier())
            .append("totalActiveCustomer", getTotalActiveCustomer())
            .append("totalActiveSupplier", getTotalActiveSupplier())
            .append("totalCustomerOrders", getTotalCustomerOrders())
            .append("totalSupplierOrders", getTotalSupplierOrders())
            .append("totalCustomerAmount", getTotalCustomerAmount())
            .append("totalSupplierAmount", getTotalSupplierAmount())
            .append("totalCustomerQuantity", getTotalCustomerQuantity())
            .append("totalSupplierQuantity", getTotalSupplierQuantity())
            .append("totalCustomerDefectiveQuantity", getTotalCustomerDefectiveQuantity())
            .append("totalSupplierDefectiveQuantity", getTotalSupplierDefectiveQuantity())
            .append("productionYieldRate", getProductionYieldRate())
            .append("totalStockIn", getTotalStockIn())
            .append("totalStockOut", getTotalStockOut())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
